import zope.interface
import zope.schema

from LCAClassifier.web.config import config


class ILCAClassify(zope.interface.Interface):


    database = zope.schema.Choice(
        title=u'Database name',
        values=config.NAMES,
        default=config.DEFAULT,
        description=u'Reference database and taxonomy '
                    'to use for classification. '
                    'SilvaMod was derived from modification of  '
                    'the SILVA nr SSU Ref 106 '
                    'and Greengenes directly from the '
                    'Greengenes 2011 release.',
        required=True)

    fastafiles = zope.schema.Field(
        title=u"FASTA files",
        description=u'Select one or more FASTA files to be uploaded',
        required=True)
    
        
    uri = zope.schema.TextLine(
                               title=u'Fasta file URI',
                               required=False)

    bitscore = zope.schema.Int(
        title=u'LCA relative range (%)',
        description=(u'Relative decrease in bitscore from the '
                     'best aligment to use for lowest common ancestor '
                     'classification'),
        default=2,
        required=True)

    minscore = zope.schema.Int(
        title=u'Minimum bit-score',
        description=(u'Sequences with a best alignment '
                     'below this treshold will not classifed.'),
        default=155,
        required=True)

    email = zope.schema.TextLine(
        title=u'E-Mail',
        description=(u'Enter your email address if you want to be notified '
                     'when the job has completed'),
        required=False)


class ILCAClassifyJob(zope.interface.Interface):

    input_file_names = zope.schema.List(
        title=u'Input file names')


class IMyMailer(zope.interface.Interface):

    sender = zope.interface.Attribute('Sender')
